package com.yehuishou.service.impl;


import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.yehuishou.dao.ClassifyDao;
import com.yehuishou.pojo.BackItem;
import com.yehuishou.pojo.Classify;
import com.yehuishou.service.ClassifyService;


@Service
public class ClassifyServiceImpl implements ClassifyService{

	@Resource
	private ClassifyDao classifyDao;
	
	
	@Override
	public List<Classify> getAllClassify() {
		
		return classifyDao.getAllclassify();
	}


	@Override
	public List<BackItem> getAllcbm(BackItem backItem) {
		
	return classifyDao.getAllcbm(backItem);
	
	}


	@Override
	public boolean checkClassifyExist(Classify classify) {
	     Classify classify2 = classifyDao.checkClassifyExist(classify);
	     
	     System.out.println(classify2);
	     if(classify2==null) {
	    	 
	    	 return true; 
	     }else {
	    	 return false; 
	     }
		
	}


	@Override
	public void addClassify(Classify classify) {
		
		classifyDao.addClassify(classify);
		
	}



}
